import { getPrescriptionPic } from "@/apis/consult"
import { showImagePreview, showToast } from "vant"

//查看处方
export const useShowPre = ()=>{
  const showImagePre = async (id?: string) => {
    if (id) {
      const res = await getPrescriptionPic(id)
      console.log(res)
      showImagePreview([res.data.url])
    } else {
      showToast('暂无处方')
    }
  }
  return {
    showImagePre
  }
}